<?PHP

class OP_MetaWidget extends OP_WidgetTemplate{
	function render(){
		$title = empty($this->values['title']) ? __('Meta') : apply_filters('widget_title', $this->values['title']);
	?>
			<?php echo $this->values['before_title'] . $title . $this->values['after_title']; ?>
			<ul>
			<?php wp_register(); ?>
			<li><?php wp_loginout(); ?></li>
			<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
			<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>
			<li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>
			<?php wp_meta(); ?>
			</ul>
		<?php
	}

	function do_post($post){
		$title = strip_tags(stripslashes($post['title']));

		return compact('title');
	}	

	function options(){
		$title = attribute_escape($this->values['title']);
		
		echo '<p><label for="'.$this->widget->class.'-title-'.$this->values['number'].'">'._e('Title:').' <input class="widefat" id="'.$this->widget->class.'-title-'.$this->values['number'].'" name="'.$this->widget->class.'['.$this->values['number'].'][title]" type="text" value="'.$title.'" /></label></p>';
	}
}

$widget = new OP_Widget('meta');
$widget->setMeta('OP Meta',"Log in/out, admin, feed and WordPress links");
$widget->setDefaults(array('title'=>''));

$opw_meta = new OP_MetaWidget($widget);
add_action('widgets_init', array($opw_meta, 'init'));

?>